<template>
  <div class="app-container">
    <div class="in-crumbs" id="categoryNav">
      <div class="in-title-nav">
        <span>平台授权 </span>
        <span class="simsun">&gt;</span>
        <span> Walmart授权 </span>
      </div>
    </div>

    <div class="in-container">
      <div class="in-screen-single">
        <div class="title">平台：</div>
        <div class="item">
          <a
            href="javascript:"
            class="m-right20 searchType"
            :class="{ 'in-active': activeIndex === 0 }"
            @click="shopAuthSetSearchType(0, this, true)"
            >全部(4)</a
          >
          <a
            href="javascript:"
            class="m-right20 searchType"
            :class="{ 'in-active': activeIndex === 1 }"
            @click="shopAuthSetSearchType(1, this, true)"
            >已授权(0)</a
          >
          <a
            href="javascript:"
            class="m-right20 searchType"
            :class="{ 'in-active': activeIndex === 2 }"
            @click="shopAuthSetSearchType(2, this, true)"
            >未授权(0)</a
          >
          <div class="ipt-icon fr">
            <el-input
              v-model="input"
              class="form-component"
              id="searchPlatform"
              placeholder="搜索平台名称"
            />
            <i class="attach-icons md-25 gray-c el-icon-search"></i>
          </div>
        </div>
      </div>

      <div class="in-screen-single p-bottom0">
        <div class="title"></div>
        <div class="item">
          <div class="plat-auth-box platAuthBox">
            <span
              class="plat-auth-icon platAuthIconSpan smt"
              :class="{ 'plat-active': activeTab === 'smt' }"
              id="m407"
              data-auth=""
              data-name="速卖通,aliexpress,smt"
              @click="platAuthShopList('smt')"
            >
              <i></i>
            </span>
            <span
              class="plat-auth-icon platAuthIconSpan amazon"
              :class="{ 'plat-active': activeTab === 'amazon' }"
              id="m417"
              data-auth=""
              data-name="amazon,亚马逊"
              @click="platAuthShopList('amazon')"
            >
              <i></i>
            </span>
            <span
              class="plat-auth-icon platAuthIconSpan shopee"
              :class="{ 'plat-active': activeTab === 'shopee' }"
              id="m470"
              data-auth=""
              data-name="shopee,虾皮"
              @click="platAuthShopList('shopee')"
            >
              <i></i>
            </span>
            <span
              class="plat-auth-icon platAuthIconSpan walmart"
              :class="{ 'plat-active': activeTab === 'walmart' }"
              id="m488"
              data-auth=""
              data-name="walmart,沃尔玛"
              @click="platAuthShopList('walmart')"
            >
              <i></i>
            </span>
            <span class="platAuthNoResultSpan lh34 f13 fColor2 myj-hide"
              >没有符合条件的结果</span
            >
          </div>
        </div>
      </div>
    </div>
    <div class="page-button-box">
      <div class="m-bottom10 platAuthNoResult">
        <button class="button btn-orange" @click="showAddAmazonDialog()">
          添加授权
        </button>
        <div class="inline-block m-left8">
          <a :href="`${this.url}`" target="_blank">查看帮助</a>
          <a
            class="shop_sort_a m-left8"
            href="javascript:void(0)"
            traget="_blank"
            onclick="initShopSortDiv('amazon');"
          >
            店铺排序
          </a>
        </div>
      </div>
    </div>
    <div class="in-container page-content-box p-bottom12">
      <div class="page-list">
        <div class="platAuthNoResult">
          <el-table
            v-loading="loading"
            :data="tableData"
            class="in-table in-table-border in-table-wave-process"
            height="500px"
            :empty-text="''"
          >
            <template v-slot:empty>
              <div
                class="p-top10 p-bottom10 border5 borderTopNo platAuthNoResult"
              >
                <p class="p-top50 h200 f-center">
                  <img
                    class="p-bottom10"
                    src="//www.dianxiaomi.com/static/img/noData.png"
                  />
                  <br />
                  <span class="f13 fColor2">未授权店铺</span>
                  <br />
                  <a
                    class="f16 fColor1"
                    href="javascript:void(0)"
                    @click="showAddAmazonDialog()"
                    >添加授权</a
                  >
                </p>
              </div>
            </template>

            <template v-if="walmartFlay">
              <el-table-column
                label="店铺名称"
                prop="shopName"
              ></el-table-column>
              <el-table-column
                label="公司分支"
                prop="companyBranches"
              ></el-table-column>
              <el-table-column label="站点" prop="site"></el-table-column>
              <el-table-column label="品牌" prop="brandName"></el-table-column>
              <el-table-column
                label="Consumer Id"
                prop="clientId"
                width="400"
              ></el-table-column>
              <el-table-column label="授权时间" prop="authDate">
                <template slot-scope="scope">
                  <span>{{
                    parseTime(scope.row.authDate, "{y}-{m}-{d} {h}:{i}:{s}")
                  }}</span>
                </template></el-table-column
              >
              <el-table-column label="操作" align="center">
                <template slot-scope="scope">
                  <el-button
                    size="mini"
                    type="text"
                    icon="el-icon-edit"
                    @click="handleUpdate(scope.row)"
                    >修改</el-button
                  >
                  <el-button
                    size="mini"
                    type="text"
                    icon="el-icon-delete"
                    @click="handleDelete(scope.row)"
                    >删除</el-button
                  >
                  <el-button
                    size="mini"
                    type="text"
                    icon="el-icon-check"
                    @click="handleUpdate(scope.row)"
                    >授予</el-button
                  >
                </template>
              </el-table-column>
            </template>
            <!-- <template v-if="smtFlay">
              <el-table-column label="速卖通ID"></el-table-column>
              <el-table-column label="店铺属性"></el-table-column>
              <el-table-column
                label="授权时间 (查看到期时间)"
              ></el-table-column>
            </template>
            <template v-if="amazonFlay">
              <el-table-column label="商户ID"></el-table-column>
              <el-table-column label="授权国家"></el-table-column>
              <el-table-column label="授权类型"></el-table-column>
              <el-table-column label="授权时间"></el-table-column>
            </template>
            <template v-if="shopeeFlay">
              <el-table-column label="站点"></el-table-column>
              <el-table-column label="是否跨境"></el-table-column>
              <el-table-column label="SHOP ID"></el-table-column>
              <el-table-column label="SIP 子店铺" align="center">
                <el-table-column label="店铺名称"></el-table-column>
                <el-table-column label="站点"></el-table-column>
                <el-table-column label="SHOP ID"></el-table-column>
              </el-table-column>
              <el-table-column label="授权时间"></el-table-column>
            </template> -->
          </el-table>
        </div>
      </div>
    </div>
    <div class="m-top10 platAuthNoResult">
      <table>
        <tbody>
          <tr>
            <td colspan="2">
              <div class="explain-module default">
                <span class="tit"></span>
                <span class="cont">
                  <div>1、多店铺授权，防关联；</div>
                  <div>2、同一店铺不可重复授权；</div>
                  <div>3、删除授权，不影响平台数据。</div>
                </span>
              </div>
            </td>
          </tr>
        </tbody>
      </table>
    </div>

    <el-dialog
      :title="title"
      :visible.sync="open"
      width="500px"
      append-to-body
      :close-on-click-modal="false"
    >
      <el-form ref="form" :model="form" :rules="rules" label-width="83px">
        <el-form-item label="店铺名称:" prop="shopName">
          <el-input
            v-model="form.shopName"
            placeholder="必填项，自定义店铺名称"
          />
        </el-form-item>
        <el-form-item label="公司分支" prop="companyBranches">
          <el-input
            v-model="form.companyBranches"
            placeholder="必填项，自定义公司分支"
          />
        </el-form-item>
        <el-form-item label="开户站:" prop="site">
          <el-select
            v-model="form.site"
            placeholder="请选择"
            style="width: 380px"
          >
            <el-option
              v-for="item in options"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="品牌">
          <el-select
            v-model="form.authBrandId"
            multiple
            filterable
            placeholder="请选择"
          >
            <el-option
              v-for="item in optionsBrand"
              :key="item.id"
              :label="item.label"
              :value="item.id"
            >
            </el-option>
          </el-select>
          &nbsp;
          <el-link
            :underline="false"
            style="margin-left: 24px"
            @click="addBrand"
            >更多品牌</el-link
          >
        </el-form-item>
        <el-form-item>
          <div class="client-div">
            <el-form-item
              label="Client ID:"
              label-width="118px"
              style="margin-bottom: 18px"
              prop="clientId"
            >
              <el-input
                v-model="form.clientId"
                placeholder="Client ID"
                style="width: 259px"
              ></el-input>
            </el-form-item>
            <el-form-item
              label="Client Secret:"
              label-width="118px"
              prop="clientSecret"
            >
              <el-input
                v-model="form.clientSecret"
                placeholder="Client Secret"
                style="width: 259px"
              ></el-input>
            </el-form-item>
          </div>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">授 权</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>

    <!-- 更多品牌弹窗 -->
    <el-dialog
      :title="titleBrand"
      :visible.sync="openBrand"
      width="60%"
      append-to-body
      :close-on-click-modal="false"
    >
      <el-row :gutter="10" class="mb8">
        <el-col :span="1.5">
          <el-button
            type="primary"
            icon="el-icon-plus"
            size="mini"
            @click="handleAddInboundBrand"
            >添加</el-button
          >
        </el-col>
      </el-row>

      <el-table
        v-if="refreshTable"
        v-loading="loading"
        :data="brandList"
        row-key="authBrandId"
        :default-expand-all="isExpandAll"
        :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
        height="500px"
      >
        <el-table-column
          label="品牌编号"
          prop="brandNumber"
          align="center"
          min-width="120"
        />
        <el-table-column
          label="品牌名称"
          prop="brandName"
          align="center"
          :show-overflow-tooltip="true"
          min-width="120"
        />
        <el-table-column
          label="添加时间"
          prop="createTime"
          align="center"
          min-width="180"
        >
          <template slot-scope="scope">
            {{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}
            {{ parseTime(scope.row.createTime, "{h}:{i}") }}
          </template>
        </el-table-column>
        <el-table-column
          label="修改时间"
          prop="updateTime"
          align="center"
          min-width="180"
        >
          <template slot-scope="scope">
            {{ parseTime(scope.row.updateTime, "{y}-{m}-{d}") }}
            {{ parseTime(scope.row.updateTime, "{h}:{i}") }}
          </template>
        </el-table-column>
        <el-table-column label="操作" align="center" min-width="150">
          <template slot-scope="scope">
            <!-- 判断当前节点是否是顶级父节点（parentId === 0） -->
            <el-button
              size="mini"
              type="text"
              icon="el-icon-edit"
              v-if="scope.row.parentId === 0"
              @click="handleBrandUpdate(scope.row)"
              >修改</el-button
            >
            <el-button
              size="mini"
              type="text"
              icon="el-icon-delete"
              v-if="scope.row.parentId === 0"
              @click="handleBrandDelete(scope.row)"
              >删除</el-button
            >
          </template>
        </el-table-column>
      </el-table>
    </el-dialog>

    <!-- 添加品牌 -->
    <el-dialog
      :title="titleAddBrand"
      :visible.sync="openAddBrand"
      width="400px"
      append-to-body
      :close-on-click-modal="false"
    >
      <el-form ref="formBrand" :model="formBrand" label-width="80px">
        <el-form-item label="品牌名称:" prop="brandName">
          <el-input
            v-model="formBrand.brandName"
            placeholder="必填项，自定义品牌名称"
          />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitBrandForm">确 定</el-button>
        <el-button @click="cancelBrand">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import {
  getShopAuth,
  getList,
  delShopAuth,
  updateShopAuth,
  getInfo,
  getSelectAuthBrand,
  getAuthBrandInsert,
  getSelectByAuthBrandId,
  getUpdateAuthBrand,
  getUpdateByAuthBrandId,
  getAuthBrandTree,
} from "@/api/walmart/auth";
export default {
  data() {
    return {
      loading: false,
      activeIndex: 0,
      input: "",
      activeTab: "walmart", // 默认没有激活的tab
      url: "https://help.dianxiaomi.com/help/getRefreshContent.htm?id=676&amp;parentId=6", //查看帮助路径
      tableData: [],
      walmartFlay: true,
      smtFlay: false,
      amazonFlay: false,
      shopeeFlay: false,
      // 是否显示弹出层
      open: false,
      openBrand: false,
      openAddBrand: false,
      // 弹出层标题
      title: "",
      titleBrand: "",
      titleAddBrand: "",
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        shopName: [
          { required: true, message: "请输入店铺名称", trigger: "blur" },
        ],
        companyBranches: [
          { required: true, message: "请输入公司分支", trigger: "blur" },
        ],
        site: [{ required: true, message: "请选择开户站", trigger: "change" }],
        clientId: [
          { required: true, message: "请输入Client ID", trigger: "blur" },
        ],
        clientSecret: [
          { required: true, message: "请输入Client Secret", trigger: "blur" },
        ],
      },
      options: [
        {
          value: "US",
          label: "美国",
        },
        {
          value: "CA",
          label: "加拿大",
        },
      ],
      optionsBrand: [],
      brandList: [], // 更多品牌数据列表
      formBrand: {},
      isExpandAll: true, // 默认展开所有行
      refreshTable: true, // 控制表格刷新
    };
  },
  created() {
    this.getShopAuthList();
    this.getBrandTree();
  },
  methods: {
    // 表单重置
    reset() {
      this.form = {
        shopName: null,
        site: null,
        clientId: null,
        clientSecret: null,
      };
      this.resetForm("form");
    },
    resetBrand() {
      this.formBrand = {
        brandName: null,
      };
      this.resetForm("formBrand");
    },
    platAuthShopList(tab) {
      this.activeTab = tab; // 点击时改变激活的tab
      if (tab == "walmart") {
        this.url =
          "https://help.dianxiaomi.com/help/getRefreshContent.htm?id=676&amp;parentId=6";
        this.walmartFlay = true;
        this.smtFlay = false;
        this.amazonFlay = false;
        this.shopeeFlay = false;
      } else if (tab == "smt") {
        this.url = "https://help.dianxiaomi.com/pre/getContent.htm?id=8";
        this.walmartFlay = false;
        this.smtFlay = true;
        this.amazonFlay = false;
        this.shopeeFlay = false;
      } else if (tab == "amazon") {
        this.url = "https://help.dianxiaomi.com/pre/getContent.htm?id=2254";
        this.walmartFlay = false;
        this.smtFlay = false;
        this.amazonFlay = true;
        this.shopeeFlay = false;
      } else if (tab == "shopee") {
        this.url = "https://help.dianxiaomi.com/pre/getContent.htm?id=302";
        this.walmartFlay = false;
        this.smtFlay = false;
        this.amazonFlay = false;
        this.shopeeFlay = true;
      } else {
        this.url = null;
      }
    },
    /** 添加授权 */
    showAddAmazonDialog() {
      if (this.activeTab == "walmart") {
        this.reset();
        this.title = "添加Walmart授权";
        this.open = true;
      }
    },

    /** 授权按钮 */
    submitForm() {
      this.$refs["form"].validate((valid) => {
        if (valid) {
          console.log(JSON.stringify(this.form, null, 2));
          this.form.authBrandIds = this.form.authBrandId;
          this.form.authBrandId = null;
          if (this.form.authId != null) {
            updateShopAuth(this.form).then((response) => {
              this.$modal.msgSuccess("重新授权成功！");
              this.open = false;
              this.getShopAuthList();
            });
          } else {
            getShopAuth(this.form).then((response) => {
              this.$modal.msgSuccess("授权成功！");
              this.open = false;
              this.getShopAuthList();
            });
          }
        }
      });
    },
    /** 查询所有店铺授权记录 */
    getShopAuthList() {
      getList().then((response) => {
        this.tableData = response.data;
      });
    },
    /** 取消按钮 */
    cancel() {
      this.open = false;
      this.reset();
    },

    /** 删除店铺授权记录 */
    handleDelete(row) {
      this.$modal
        .confirm('是否确认删除"' + row.shopName + '"店铺授权的记录！')
        .then(function () {
          return delShopAuth(row.authId);
        })
        .then(() => {
          this.getShopAuthList();
          this.$modal.msgSuccess("删除成功");
        })
        .catch(() => {});
    },

    /** 重新授权店铺 */
    handleUpdate(row) {
      this.reset();
      this.title = "重新Walmart授权";
      this.open = true;
      getInfo(row.authId).then((response) => {
        const data = response.data;

        // 获取返回的 authBrandId 字段
        let brandStr = data.authBrandId;

        // 将返回的字符串转换为数组
        this.form = {
          ...data,
          authBrandId: brandStr
            ? // 如果 brandStr 不是空
              brandStr.includes(",")
              ? // 如果包含逗号，拆分为数组并转换为数字
                brandStr
                  .split(",")
                  .map((item) => Number(item.trim()))
                  .filter(Boolean)
              : // 否则单一值直接作为数组
                [Number(brandStr.trim())]
            : [], // 如果没有值，设置为空数组
        };
      });
    },
    shopAuthSetSearchType(index) {
      this.activeIndex = index;
    },
    addBrand() {
      this.titleBrand = "品牌管理";
      this.openBrand = true;
      this.getAuthBrand();
    },
    /** 查询品牌 */
    getAuthBrand() {
      getSelectAuthBrand(null).then((response) => {
        this.brandList = this.handleTree(response.data, "authBrandId");
      });
    },
    handleAddInboundBrand() {
      this.titleAddBrand = "添加品牌";
      this.openAddBrand = true;
    },
    cancelBrand() {
      this.resetBrand();
      this.openAddBrand = false;
    },
    submitBrandForm() {
      this.$refs["formBrand"].validate((valid) => {
        if (valid) {
          if (this.formBrand.authBrandId == null) {
            getAuthBrandInsert(this.formBrand).then((response) => {
              this.$modal.msgSuccess("添加品牌成功！");
              this.openAddBrand = false;
              this.getAuthBrand();
              this.getBrandTree();
              this.resetBrand();
            });
          } else {
            getUpdateAuthBrand(this.formBrand).then((response) => {
              this.$modal.msgSuccess("修改品牌成功！");
              this.openAddBrand = false;
              this.getAuthBrand();
              this.getBrandTree();
              this.resetBrand();
            });
          }
        }
      });
    },
    handleBrandUpdate(row) {
      this.titleAddBrand = "修改品牌";
      this.openAddBrand = true;
      this.formBrand.brandName = null; // 清空对应的品牌名称
      getSelectByAuthBrandId(row.authBrandId).then((response) => {
        this.formBrand = response.data;
      });
    },
    handleBrandDelete(row) {
      this.$modal
        .confirm('是否确认删除品牌编号为"' + row.brandNumber + '"的数据项？')
        .then(function () {
          return getUpdateByAuthBrandId(row.authBrandId);
        })
        .then(() => {
          this.getAuthBrand();
          this.getBrandTree();
          this.$modal.msgSuccess("删除成功");
        })
        .catch(() => {});
    },
    getBrandTree() {
      getAuthBrandTree(null).then((response) => {
        this.optionsBrand = response.data;
      });
    },
  },
};
</script>

<style>
.in-title-nav {
  float: left;
  line-height: 30px;
  color: #a0a3a6;
  font-size: 13px;
}

.in-column .in-crumbs {
  padding: 0;
  font-weight: 400;
}

.in-crumbs {
  height: 40px;
  line-height: 40px;
  color: #737679;
  font-size: 13px;
}

.in-title-nav span:last-child {
  color: #434649;
}

.in-container {
  padding: 2px 12px;
  background: #fff;
  box-shadow: 0 0 4px 0 rgba(0, 34, 77, 0.15);
}

.in-screen-single {
  display: flex;
  padding: 6px 0;
}

.in-screen-single .title {
  width: 80px;
  color: #737679;
  height: 29px;
  line-height: 29px;
}

.in-screen-single .item {
  width: calc(100% - 80px);
}

.in-screen-single .item > a.in-active {
  background-color: #428bca;
  color: #fff;
}

.in-screen-single .item > a {
  display: inline-block;
  margin: 5px 16px 5px 0;
  border-radius: 2px;
  padding: 2px 5px;
  height: 19px;
  line-height: 15px;
  color: #434649;
  word-wrap: normal;
  word-break: keep-all;
  vertical-align: middle;
}

.m-right20 {
  margin-right: 20px !important;
}

a,
a:hover,
a:focus {
  text-decoration: none;
}

.ipt-icon {
  position: relative;
}

.fr {
  float: right;
}

.attach-icons.md-25 {
  width: 25px;
  height: 25px;
  font-size: 20px;
}

.ipt-icon > .attach-icons {
  position: absolute;
  top: 4px;
  right: 5px;
}

.attach-icons {
  font-family: "Material Icons";
  font-weight: 400;
  font-style: normal;
  font-size: 24px;
  display: inline-block;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "liga";
}

.gray-c {
  color: #737679 !important;
}

.in-screen-single {
  display: flex;
  padding: 6px 0;
}

.p-bottom0 {
  padding-bottom: 0 !important;
}

.in-screen-single .title {
  width: 80px;
  color: #737679;
  height: 29px;
  line-height: 29px;
}

.in-screen-single .item {
  width: calc(100% - 80px);
}

.plat-auth-box {
  display: inline-block;
  /* width: 950px; */
}

.myj-hide {
  display: none;
}

.f13 {
  font-size: 13px !important;
}

.lh34 {
  line-height: 34px !important;
}

.fColor2 {
  color: #999;
}

.plat-auth-icon.walmart {
  background-position: -2px -1335px;
}

.plat-auth-icon {
  background-image: url(https://www.dianxiaomi.com/static/img/platAuthIcon.png?v=10.37);
  background-repeat: no-repeat;
}

.plat-auth-icon {
  position: relative;
  display: inline-block;
  margin-right: 10px;
  margin-bottom: 10px;
  border: 1px solid #eee;
  width: 120px;
  height: 36px;
  cursor: pointer;
}

.plat-auth-icon.smt {
  background-position: -2px -104px;
}

.plat-auth-icon.amazon {
  background-position: -2px -308px;
}

.plat-auth-icon.shopee {
  background-position: -2px -1025px;
}

.plat-auth-icon.amazon.plat-active,
.plat-auth-icon.amazon:hover {
  background-position: -2px -359px;
}

.plat-auth-icon.walmart.plat-active,
.plat-auth-icon.walmart:hover {
  background-position: -2px -1386px;
}

.plat-auth-icon.shopee.plat-active,
.plat-auth-icon.shopee:hover {
  background-position: -2px -1077px;
}

.plat-auth-icon.smt.plat-active,
.plat-auth-icon.smt:hover {
  background-position: -2px -155px;
}

.plat-auth-icon.amazon {
  background-position: -2px -308px;
}

.plat-auth-icon {
  cursor: pointer;
}

.plat-active {
  border: 1px solid #428bca;
}

.plat-auth-icon.plat-active i {
  position: absolute;
  right: 0;
  bottom: -1px;
  display: inline-block;
  width: 20px;
  height: 20px;
  background: url(https://www.dianxiaomi.com/static/img/platAuthSelectedIcon.png?v=1)
    no-repeat 0 0;
}

.page-button-box {
  margin: 20px 0 12px;
  zoom: 1;
}

.m-bottom10 {
  margin-bottom: 10px !important;
}

.btn-orange {
  border-color: #ff8345;
  font-size: 13px;
  color: #fff;
  background-color: #ff8345;
}

.button {
  display: inline-block;
  margin-bottom: 0;
  border: 1px solid transparent;
  border-radius: 2px;
  padding: 0 12px;
  font-weight: 400;
  height: 32px;
  line-height: 30px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  touch-action: manipulation;
  -ms-touch-action: manipulation;
}

.m-left8 {
  margin-left: 8px !important;
}

.inline-block {
  display: inline-block !important;
  font-size: 13px;
}

a {
  color: #428bca;
}

a,
a:hover,
a:focus {
  text-decoration: none;
}

a {
  background-color: transparent;
}

.in-container.page-content-box {
  padding: 0;
  zoom: 1;
}

.in-container {
  padding: 2px 12px;
  background: #fff;
  box-shadow: 0 0 4px 0 rgba(0, 34, 77, 0.15);
}

.p-bottom12 {
  padding-bottom: 12px !important;
}

.page-list {
  padding: 12px 12px 0;
}

.in-table-border {
  border: 1px solid #e8e8e8;
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
  background-color: transparent;
}

.p-bottom10 {
  padding-bottom: 10px !important;
}

.p-top10 {
  padding-top: 10px !important;
}

.borderTopNo {
  border-top: none !important;
}

.f13 {
  font-size: 13px !important;
}

.fColor2 {
  color: #999;
}

.p-top50 {
  padding-top: 50px !important;
}

.f-center {
  text-align: center !important;
}

.f16 {
  font-size: 16px !important;
}

.fColor1 {
  color: #428bca;
}

.el-table__empty-text {
  line-height: 20px;
  width: 50%;
  color: #909399;
}

.m-top10 {
  margin-top: 10px !important;
}

.explain-module {
  display: flex;
  width: 100%;
}

.explain-module > .tit {
  /* padding-left: 8px; */
  border-radius: 2px;
  min-width: 32px;
  height: 20px;
  line-height: 20px;
  background-color: #00aeb3;
  color: #fff;
  text-align: center;
  font-size: 12px;
}

.explain-module.default > .tit::after {
  content: "说明";
}

:after,
:before {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

.explain-module > .cont {
  margin-left: 4px;
  color: #737679;
  line-height: 20px;
  text-align: left;
  font-size: 13px;
}

.btn-orange:hover,
.btn-orange:focus {
  border-color: #e97234;
  color: #fff;
  background-color: #e97234;
}

/* 全局样式文件，例如在Vue项目的App.vue或一个单独的css文件中 */
.el-dialog__header .el-dialog__title {
  font-size: 15px;
  /* 示例：修改字体大小 */
  color: rgb(160, 159, 159);
  /* 示例：修改字体颜色 */
}

.client-div {
  background-color: #f2f2f2;
  height: 124px;
  display: flex;
  justify-content: center;
  flex-direction: column;
}

.el-dialog__body {
  padding: 6px 20px;
  color: #606266;
  font-size: 14px;
  word-break: break-all;
}
</style>
